package statemodel.test;

import statemodel.entity.NewGumballMachine;

/**
 * 状态模式糖果机测试
 * 增加了一个有机会赢一个糖果的小游戏状态模式
 * @author yaojianfeng
 */
public class GumballMachineTestDrive {
    public static void main(String[] args) {
        NewGumballMachine newGumballMachine = NewGumballMachine.getInstance();
        newGumballMachine.setCount(10);
        for (int i = 1; i < 8; i++) {
            System.out.println("❤陈美羽小朋友❤  I LOVE YOU");
            System.out.println("天灵灵,地灵灵,老婆大人快显灵! 呔!");
            newGumballMachine.insertQuarter();
            newGumballMachine.turnCrank();
            System.out.println("❤❤❤❤❤❤❤❤");
        }

    }
}
